package cn.neusoft.feignClients;

import cn.neusoft.domain.Commodity;
import cn.neusoft.feignClients.fallback.CommodityClientFallBack;
import cn.neusoft.interceptor.FeignInterceptor;
import cn.neusoft.vo.ResultBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "allocation-server", fallback = CommodityClientFallBack.class, configuration = FeignInterceptor.class)
public interface CommodityFeignClient {

    // 通过id查询商品信息
    @GetMapping("/commodity/get/{id}")
    ResultBean<Commodity> getById(@PathVariable("id") String id);

}
